import java.io.File;
import java.util.Scanner;



public class TextReader {
	
	int totalline;
	  Scanner in;
	
	  TextReader()
	  {
		  openFile();
		  totalline =totalLine(); 
	  }
	
		
	
	
	
	 void openFile()
	 {
		 resetScanner();
	 }
	
	 String[] getAllEquationInput()
	{
		String[]  raw_equation = new String[totalline ]; //we do not use index 0 
		
		

			for (int i = 1; i <totalline ;i++)  //totalline  because we do not want the last line
			{
				String x = in.nextLine();
				raw_equation[i] = x;
			}
			
		
			return raw_equation;
		
	}
	 
	 int  totalLine()
	 {
		 int totalline = 0;
		 
		 resetScanner();
		 
		 while (in.hasNextLine())
		 {
			 in.nextLine();
			 totalline++; 
		 }
		 
		 resetScanner();
		 
		
		 
		 
		 return totalline;
	 }
	 
	 void resetScanner()
	 {
		 try
		    {
			  in = new Scanner (new File("input.txt"));
		    }
		  catch (Exception e)
			{
			  System.out.println("Thre's an input error");
			}
	 }
}
